package cm.mefobe.android.telecomcost.entities;

import java.util.ArrayList;
import java.util.Date;

import cm.mefobe.android.telecomcost.TelecomCost;

public class DayCallHistory extends CallHistory {
	private Date _date;

	public DayCallHistory() {
		super(new ArrayList<Call>(),TimePeriod.DAY);
		_date = Day.now();
	}
	
	public DayCallHistory(Date date) {
		super(new ArrayList<Call>(),TimePeriod.DAY);
		_date = date;
	}

	public DayCallHistory(ArrayList<Call> _calls, TimePeriod _period) {
		super(_calls, TimePeriod.DAY);	
		_date = Day.now();
	}

	@Override
	protected void setPeriod(TimePeriod period) {		
	}

	@Override
	public ArrayList<Call> getCalls() {		
		return TelecomCost.getDatabaseManager().getCallsByDate(_date,TelecomCost.getInstance());
	}

	@Override
	public TimePeriod getPeriod() {		
		return TimePeriod.DAY;
	}			
}
